-- GENERATED SPELL FOR [Sunfury Blood Knight] --


function spell0_21089(pUnit, Event) --@Blood Heal,Self--
pUnit:FullCastSpellOnTarget(36476,pUnit)
pUnit:RegisterEvent('Sorts_21089', 3000, 1)
end

function spell1_21089(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21089', 565, 1)
end

function spell2_21089(pUnit, Event) --@Spellbreaker,n/a--
pUnit:FullCastSpellOnTarget(35871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21089', 652, 1)
end

function Sorts_21089(pUnit, Event)
local choix_sorts_21089 = math.random(0, 2)
if choix_sorts_21089 == 0 then
pUnit:RegisterEvent('spell0_21089', 1, 1)
end
if choix_sorts_21089 == 1 then
pUnit:RegisterEvent('spell1_21089', 1, 1)
end
if choix_sorts_21089 == 2 then
pUnit:RegisterEvent('spell2_21089', 1, 1)
end
end

function mob21089_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21089', math.random(1500, 3000), 1)
end

function mob21089_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21089_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21089_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21089, 1, 'mob21089_Action')
RegisterUnitEvent(21089, 2, 'mob21089_Leave')
RegisterUnitEvent(21089, 3, 'mob21089_Kill')
RegisterUnitEvent(21089, 4, 'mob21089_Die')
